<?php
$this->load->view('common/header',
array(
  'title' =>'终端详情'
));
$this->load->view('common/sliderbar',
array(
  'menu'   => 'terminal',
  'option' => 'terminaldetail'
));
 ?>
<link rel="stylesheet" href="../public/css/shop/shop_detail.css">
<div class="main-content" style="position:relative;">
	<div class="breadcrumbs" id="breadcrumbs">
		<ul class="breadcrumb">
			<li>
        <a>终端管理</a>
			</li>
		</ul>
	</div>
	<div class="page-content">
		<div class="page-header">
			<h1>终端详情</h1>
		</div>
	</div>
  <div class="shop_detail-left" style="width:60%">
    <?php foreach ($terminal as $terminaldetail): ?>
    <div class="shop_detail-box">
      <div class="shop-icon" style="background:url(/public/img/myicon/terminal.jpg);background-position:0px -20px;"></div>
      <div class="shop-option">
        <h3 class="title">终端编号</h3>
        <span class="content" id="J_teid"><?php echo $terminaldetail['teid']; ?></span>
      </div>
      <div class="bar"></div>
      <div class="shop-option">
        <h3 class="title">客户姓名</h3>
        <span class="content" id="J_tename"><?php echo $terminaldetail['tename']; ?></span>
      </div>
      <div class="bar"></div>
      <div class="bar"></div>
      <div class="shop-option">
        <h3 class="title">生日</h3>
        <span class="content" id="J_tebirth"><?php echo $terminaldetail['tebirth']; ?></span>
      </div>
      <div class="bar"></div>
      <div class="shop-option">
        <h3 class="title">联系电话</h3>
        <span class="content" id="J_tetel"><?php echo $terminaldetail['tetel']; ?></span>
      </div>
      <div class="bar"></div>
      <div class="shop-option">
        <h3 class="title">店铺</h3>
        <span class="content" id="J_shopid"><?php echo $terminaldetail['shopid']; ?></span>
      </div>
    </div>
    <!-- <div class="shop_detail-box-min">
      <div class="shop-option">
        <h3 class="title">收货人</h3>
        <span class="content" id="J_shopconsignee"><?php echo $terminaldetail['shopconsignee']; ?></span>
      </div>
      <div class="bar"></div>
      <div class="shop-option">
        <h3 class="title">收货人电话</h3>
        <span class="content" id="J_shopctel"><?php echo $terminaldetail['shopctel']; ?></span>
      </div>
    </div>
    <div class="shop_detail-box-min">
      <h3 class="title">地址</h3>
      <span class="content" id="J_shopaddr"><?php echo $terminaldetail['shopaddr']; ?></span>
    </div> -->
    <div class="shop_detail-box-min">
      <h3 class="title">品牌</h3>
      <span class="content" id="J_bid"><?php echo $terminaldetail['bid']; ?></span>
    </div>
    <!-- <div class="shop_detail-box-max">
      <span class="content" id="J_shopinfo"><h3 class="title">店内信息</h3><?php echo $terminaldetail['shopinfo']; ?></span>
    </div> -->
    <?php endforeach; ?>
	</div>
  <div class="shop_detail-right" style="top:150px;">
    <?php if($this->session->userdata('utype')==1){ ?>
    <button type="button" class="btn btn-primary" id="dialogUpdate"><i class="icon-edit bigger-125"></i>编辑终端信息</button></br></br>
    <button type="button" class="btn btn-danger" data-teid="<?php echo $terminaldetail['teid']; ?>" id="deleteterminal"><i class="icon-trash bigger-125"></i>删除终端</button></br></br>
    <?php } ?>
    <button type="button" class="btn btn-primary" data-teid="<?php echo $terminaldetail['teid']; ?>" id="Callback"><i class="icon-pencil bigger-125"></i>添加回访</button></br></br>
    <!-- <button type="button" class="btn btn-primary" data-shopid="<?php echo $terminaldetail['teid']; ?>" id="brandtecount"><i class="icon-cloud-download bigger-125"></i>导出店铺数据资料</button> -->
  </div>
	<div class="page-content">
		<div class="page-header">
			<h1>回访记录</h1>
		</div>
	</div>
		<div class="row callback-box">
			<div class="table-responsive">
				<table id="sample-table-1" class="table table-striped table-bordered table-hover">
					<thead>
						<tr>
							<th class="center" style="width:80%">回访内容</th>
							<th class="center" style="min-width:180px;">添加时间</th>
							<th class="center" style="min-width:80px;">添加人</th>
              <?php if($this->session->userdata('utype')==1){ ?>
							<th class="center" style="min-width:80px;">操作</th>
              <?php } ?>
						</tr>
					</thead>
					<tbody>
            <?php foreach ($callback as $callback): ?>
						<tr>
							<td class="J_callback"><?php echo $callback['terminalcallback']; ?></td>
							<td class="center"><?php echo $callback['addtime']; ?></td>
							<td class="center"><?php if($callback['author']=='admin'){echo '管理员';}else{echo $callback['author'];} ?></td>
              <?php if($this->session->userdata('utype')==1){ ?>
							<td class="center">
                <a href="javascript:;" data-id="<?php echo $callback['id']; ?>" class="updateTerminalCallback">编辑</a>
                <a href="javascript:;" data-id="<?php echo $callback['id']; ?>" class="deleteTerminalCallback">删除</a>
              </td>
              <?php } ?>
            </tr>
						<?php endforeach; ?>
					</tbody>
				</table>
			</div>
  		<div style="float:right;display:inline-block;margin-top:-16px;text-align:center;">
  			<ul class="pagination" style="margin:0px;">
  				<?php echo $this->pagination->create_links() ?>
  			</ul>
  		</div>
		</div>
</div>
<script type="text/javascript" src="../public/js/common/YMD.js"></script>
<script type="text/javascript" src="../public/js/shopbranditem/shopbranditem.js"></script>
<script type="text/javascript" src="../public/js/terminal/terminaldetail.js"></script>
<script type="text/javascript">
</script>
<?php
  $this->load->view('common/footer');
?>
